// import request from '@/utils/request'
import { createAPI } from '@/utils/request'

/**
 * 分页查询排班
 * @returns
 */
export const getlistApi = (data) => createAPI(`/work-schedulings`, 'get', data)
// export function getlistApi() {
//   return request({
//     url: '/work-schedulings',
//     method: 'get'
//   })
// }

/**
 * 下载排班模板
 * @returns
 */
export const getModelApi = () => createAPI(`/work-schedulings/downExcelTemplate`, 'get')

/**
 * 获取机构模板
 * @param {*} data
 * @returns
 */
export const businessTreeApi = data => createAPI(`/business-hall/tree`, 'get', data)

/**
 * 批量关联排班
 * @param {*} data
 * @returns
 */
export const workSchedulingsApi = data => createAPI(`/work-schedulings`, 'put', data)

/**
 * 工作模式列表
 * @param {*} data
 * @returns
 */
export const workPatternsApi = data => createAPI(`/work-patterns/all`, 'get', data)
// /work-patterns/all
// /work-patterns/page

/**
 * 工作模式分页
 * @param {*} data
 * @returns
 */
export const workPatternsPageApi = data => createAPI(`/work-patterns/page`, 'get', data)

/**
 * 删除工作模式
 * @param {*} data
 * @returns
 */
export const workPatternsdelApi = data => createAPI(`/work-patterns/${data.id}`, 'delete', data)

/**
 * 增加工作模式
 * @param {*} data
 * @returns
 */
export const workPatternsaddApi = data => createAPI(`/work-patterns`, 'post', data)

/**
 * 编辑工作模式
 * @param {*} data
 * @returns
 */
export const workPatternseditApi = data => createAPI(`/work-patterns`, 'put', data)
